<template>
	<view class="container serviceItems2">
		<u-navbar :title="title"  safeAreaInsetTop fixed placeholder :autoBack="true" :borderBottom="false"></u-navbar>
		<view class="search-container"
			style="width: 686rpx; border-radius: 15px;margin: auto; padding-left: 24rpx;">
			<!-- <uni-data-picker v-slot:default="{data, error}" v-model="selectedRegion" :localdata="regions"
				popup-title="请选择城市" @nodeclick="onRegionNodeClick" @change="onSelectedRegionChange">
				<view v-if="error">
					<text>！</text>
					<u-icon style="margin-left: 8rpx;" name="arrow-down-fill" color="#666"></u-icon>
				</view>
				<view v-else-if="data.length" class="selected">
					<text>{{data[1].text}}</text>
					<u-icon style="margin-left: 8rpx;" size="20" name="arrow-down-fill" color="#666"></u-icon>
				</view>
				<view v-else>
					<text>请选择</text>
					<u-icon style="margin-left: 8rpx;" size="20" name="arrow-down-fill" color="#666"></u-icon>
				</view>
			</uni-data-picker> -->
			<view class="selected">
				<text>南充</text>
				<u-icon style="margin-left: 8rpx;" size="20" name="arrow-down-fill" color="#666"></u-icon>
			</view>
			<view class="search-line1" style="margin-left: 20rpx;"></view>
			<input placeholder="搜索预设文案" v-model="searchVal" />
			<image style="width: 40rpx; height: 40rpx; margin-right: 20rpx;"
				src="/static/home/home-search@2x.png">
			</image>
		</view>
		<view class="u-flex" style="flex: 1; align-items: flex-start; padding-top: 20rpx;">
			<view class="left1" style="height: 100%; background: rgba(245, 245, 245, 1);">
				<view @click="leftItemClick(index)" v-for="(item,index) in leftArr" class="leftItem1" :class="leftIndex == index?'leftItem1_sel':''">
					{{item.name}}
				</view>
			</view>
			<view class="right1" style="margin-left: 24rpx;">
				<view v-for="(item,index) in rightArr" :key="index">
					<view style="margin-bottom: 24rpx; padding-top: 24rpx; font-weight: 500;color: #333333; font-size: 32rpx;">{{item.name}}</view>
					<view @click="rightItemClick(item1)" v-for="(item1,index1) in  item.list" :key="index1" class="flex-row-start" style="width: 510rpx; padding: 24rpx 0rpx; border-bottom: 1px solid rgba(245, 245, 245, 1);">
						<image style="width: 160rpx; height: 160rpx;border-radius: 16rpx; background: rgb(230, 230, 230);"></image>
						<view class="flex-col-start" style="position: relative; margin-left: 16rpx; height: 160rpx; align-items: flex-start; justify-content: space-between;">
						    <view class="flex-col-start" style="align-items: flex-start;">
								<view style="font-weight: 600; font-size:28rpx; line-height: 30rpx;">立式空调清洗2台长安显示显示673442</view>
								<view style="margin-top: 8rpx; font-weight: 500; font-size:24rpx; color: rgba(153, 163, 160, 1);">销量1952次</view>
							</view>
							<view style="font-weight: 600; font-size:24rpx; color: rgba(252, 116, 4, 1)">￥<span style="font-size: 32rpx;">200</span>.05</view>
							<view class="flex-row-start" style="position: absolute; right: 0px; bottom: 0;">
								<image @click="delItemClick(item1)" style="width: 40rpx; height: 40rpx;" v-show="item1.count > 0" src="/static/icon/add1_2.png"></image>
								<input v-model="item1.count" v-show="item1.count > 0" style="width: 64rpx; height: 48rpx; margin-left: 10rpx; margin-right: 10rpx; background: #F5F5F5; border-radius: 8rpx; font-size: 24rpx; font-weight: 600; text-align: center;"></input>
								<image @click="addItemClick(item1)" style="width: 40rpx; height: 40rpx;" src="/static/icon/add1_1.png"></image>
							</view>
						</view>
						<!-- <view style="color: rgba(153, 153, 153, 1); font-size: 24rpx; margin-top: 12rpx; margin-bottom: 26rpx; font-weight: 500;">{{item1.name}}</view> -->
						
					</view>
				</view>
				
			</view>
			
			
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'清洗保洁',
				searchVal: '',
				dataList:[],
				leftIndex:0,
				leftArr:[{name:'家具服务'},{name:'家电服务'},{name:'电路灯具'},{name:'清洗保洁'},{name:'服务分类'}],
				rightArr:[{name:'家具安装',list:[{name:'沙发组装',count:0},{name:'沙发组装',count:0},{name:'沙发组装',count:0},{name:'沙发组装',count:0},{name:'沙发组装',count:0},{name:'宠物家具 组装',count:0},{name:'宠物家具 组装',count:0},{name:'宠物家具 组装',count:0}]},
				{name:'家具拆卸',list:[{name:'柜类组装',count:0},{name:'柜类组装3',count:0},{name:'柜类组装4',count:0},{name:'柜类组装',count:0},{name:'柜类组装0',count:0},{name:'柜类组装1',count:0},{name:'柜类组装',count:0},{name:'柜类组装',count:0},{name:'柜类组装',count:0},{name:'柜类组装',count:0},{name:'柜类组装',count:0},{name:'柜类组装',count:0},{name:'柜类组装',count:0}]}]

			}
		},
		methods: {
			queryList(){
				
			},
			leftItemClick(index){
				this.leftIndex = index
			},
			rightItemClick(item){
				
			},
			delItemClick(item){
				item.count = item.count -1
			},
			addItemClick(item){
				item.count = item.count + 1
			}
			

		}
	}
</script>

<style lang="scss">
	.search-container {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
		border: 1rpx solid #0BB1EF;
		border-radius: 24rpx;
		height: 76rpx;

		background-color: rgba(11, 177, 239, 0.10);


		input {
			font-size: 30rpx;
			padding: 0 20rpx 0 0;
			flex: 1;
			margin-left: 20rpx;

		}

		text {
			font-size: 32rpx;
			font-weight: 600;
		}

		.search-line1 {
			width: 1px;
			height: 32rpx;
			background: #D9D9D9;
		}
	}
	.serviceItems2{
		.leftItem1{
			width: 184rpx;
			height: 92rpx;
			line-height: 92rpx;
			text-align: center;
			color: rgba(102, 102, 102, 1);
			font-weight: 500;
			font-size: 28rpx;
		}
		.leftItem1_sel{
			background-color: rgba(255, 255, 255, 1);
			color: rgba(11, 177, 239, 1);
			font-size: 32rpx;
			font-weight: 600;
		}
	}
</style>